1. Field of the Invention
The present invention relates to a file management system for performing data management of a plurality of files divisionally set in nonvolatile memories in an IC card which incorporates an IC chip having the nonvolatile memories and a control element for controlling these memories.
2. Description of the Related Art
In recent years, as a portable data storage medium, an IC card which incorporates an IC chip having a nonvolatile data memory and a control element (CPU) for controlling the memory has been receiving a lot of attention.
In an IC card of this type, an internal data memory is divided into a plurality of files. Each file stores data necessary for execution of a software application for the IC card, an identification number, and other information. By inputting an application identification name from an external device (terminal), a corresponding file in the IC card is selectively set in a useable state. For this reason, a plurality of application data are divided into files, and are stored in a single IC card, thus realizing multiple-purpose utilizations.
A plurality of data files for storing data such as transaction data, and a key file for storing key data can belong to each of these application files.
The data files, data areas, and key areas are managed by the internal CPU of the IC card. U.S. Pat. No. 5,226,155 patented on Jul. 6, 1993 (Iijima) discloses such an IC card. In this case, in order to recognize position attributes of the files and areas by the CPU, definition information of each of these files and areas may be stored and managed in a directory in the IC card.
In this case, the data files, data areas, and key areas have different types of attributes such as position information and different data formats. Assume that a plurality of pieces of management information are stored in turn in a directory. If length information (the length information, an actual data length, or given identification information which is recognized as a length by the CPU may be used) is added to each definition, specific definition information can be searched for on the basis of the added information.
However, with this method, if definition information near the head of the directory is destroyed, the following definition information (at lower hierarchical levels) cannot be searched.
Data which is updated as needed upon operation of a card such as pointer information which indicates an information (record) position to be managed in the directory may be destroyed by, e.g., illegal removal of the card. In this case, if an access to a file indicated by the destroyed pointer can no longer be made, the operation of the entire card system is disturbed.